﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Text;

namespace RemoteTestRunner.BusinessLogic
{
    public class RtrSettingsServer : IRtrSettings
    {
        #region IRtrSettings Members

        public string DataPath
        {
            get
            {
                return ConfigurationManager.AppSettings["DataPath"];
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string WorkingFolder
        {
            get
            {
                string path;
                path = ConfigurationManager.AppSettings["WorkingFolder"];
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }
                return path;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string MSTestPath
        {
            get
            {
                return ConfigurationManager.AppSettings["MSTestPath"];
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public int TestTimeoutSeconds
        {
            get
            {
                return int.Parse(ConfigurationManager.AppSettings["TestTimeoutSeconds"]);
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public bool UseRunnerService
        {
            get
            {
                return bool.Parse(ConfigurationManager.AppSettings["UseRunnerService"]);
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public bool FilterTests
        {
            get
            {
                return bool.Parse(ConfigurationManager.AppSettings["FilterTests"]);
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string RunnerServiceUrl
        {
            get
            {
                return ConfigurationManager.AppSettings["RunnerServiceUrl"];
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion
    }
}
